AnnieRoot.gmyprize=AnnieRoot.gmyprize||{};
AnnieRoot.gmyprize.Item=function(){
	var s = this;
	annie.Sprite.call(s);
	/*_a2x_need_start*/s.prize=null;s.remark=null;s.service_btn=null;s.time=null;/*_a2x_need_end*/
	annie.initRes(s,"gmyprize","Item");
};
annie.A2xExtend(AnnieRoot.gmyprize.Item,annie.Sprite);
AnnieRoot.gmyprize.Item.prototype.id = 0;
AnnieRoot.gmyprize.Item.prototype.data = null;
AnnieRoot.gmyprize.Item.prototype.initData = function (id, data) {
	var s = this;
	s.id = id;
	if (data) {
		if (data.type == 'prize') {
			s.service_btn.visible = false;
			s.remark.visible = true;
		} else {
			s.service_btn.visible = true;
			s.remark.visible = false;
		}
		s.time.text = data.time;
		var prizeName = data.prize.length > 6 ? data.prize.slice(0, 6) : data.prize;
		s.prize.text = prizeName;
		var remark = data.remark.length > 16 ? data.remark.slice(0, 16) : data.remark;
		/*位置*/
		if (remark.length < 7) {
			s.remark.y = 24;
		} else {
			s.remark.y = 6;
		}
		s.remark.text = remark;
		if (s.service_btn.visible && data.type == 'six') {
			s.code = data.remark;
		}

	}
};